package com.controller;

import com.dao.IHotComment;
import com.model.Sort;
import com.server.HotCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("视频评论")
@RestController
@RequestMapping("/videoComment")
public class videoCommentController {

    @Autowired
    HotCommentService hotCommentService;

    @ApiOperation(value = "性别比例")
    @GetMapping("/sexSort")
    @CrossOrigin
    public List<Sort> sexSort(String bv){
        return hotCommentService.sexSort(bv);
    }


    @ApiOperation(value = "评论排行")
    @GetMapping("/commentSort")
    @CrossOrigin
    public List<Sort> commentSort(String bv){
        return hotCommentService.commentSort(bv);
    }

}
